<!--
 * @Descripttion:
 * @version: 1.0
 * @Author: wuhao
 * @Date: 2021-10-08 15:02:52
 * @LastEditors: wuhao
 * @LastEditTime: 2021-10-09 11:14:09
-->
<!--鄂汇办页面内容部分-列表模式-->
<template>
  <div class="content">
    <div @click="goUrl(rowData)"
      v-for="(rowData,i) in rowDataList"
      class="row"
      :key="rowData+i">
      <div class="text"
        v-if="!Array.isArray(rowData.name)">
        <p :style="rowData.style">{{rowData.name}}</p>
        <p class="detail">{{rowData.detail}}</p>
      </div>
      <div class="text"
        v-if="Array.isArray(rowData.name)">
        <p v-for="name in rowData.name"
          :key="name">{{name}}</p>
      </div>
      <div class="arrowIcon"><img src="../../assets/img/arrow.svg" /></div>
    </div>
  </div>
</template>

<script>
export default {
  name: "EhbContentRow",
  props: {
    rowDataList: {
      type: Array,
      required: true
    },
    click: {
      type: String,
      required: false
    }
  },
  methods: {
    goUrl(rowData) {
      if (this.click) {
        this.$emit(this.click, rowData);
        return;
      }
      let that = this;
      let url = this.$absoultPath + rowData.url;
      if (rowData.url.indexOf("http") == 0) {
        url = rowData.url;
      }
      console.log('url--=',url)
      //that.toNOData("暂不支持办理该业务!", 0);
      ehbAppJssdk.operateWindow.open({
        title: '',
        url: url,
        urlType: 'webPage',
        backRefresh: '0',
        reloadForLogin: '0',
        closeCurrentPage: '0',
        disableScrolling: 'disable',
        pageType: '1',
        pageLevel: '2',
        params: rowData.params
      });
    }
  }
}
</script>

<style scoped>
</style>
